package com.nodecollege.cloud.client.fallback;

import com.nodecollege.cloud.client.feign.OrgClient;
import com.nodecollege.cloud.common.model.NCResult;
import com.nodecollege.cloud.common.model.po.UpmsOrg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author LC
 * @date 2020/1/10 9:50
 */
@Slf4j
@Component
public class OrgClientFallback implements OrgClient {


    @Override
    public NCResult<UpmsOrg> getOrgList(@RequestBody UpmsOrg upmsOrg) {
        String message = "upms-getOrgList 获取组织信息失败！中台熔断器——调用接口出现异常！";
        log.error(message);
        return NCResult.error("-1", message);
    }
}
